<?php
if(!$ajax){
    exit;
}
$pid=$_GET['pid']?(int)$_GET['pid']:false;
if($pid){
    $q=$db->query("select * from types where pid={$pid}");
    if($db->num_rows($q)>0){
        $str="<ul>";
        while($row = $db->fetch_array($q)){
            $str.="<li><a href='".$C['SITE_URL']."/type.php?id=".$row['id']."'>".$row['name']."</a></li>";
        }
        $str.="</ul>";
        echo $str;
    }else{
        echo "暂无子分类";
    }
}else{
    echo "暂无子分类";
}

